home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
gfx
/
3d
/
uvSurf.lha
/
uvSurf.doc
< prev
next >
Wrap
Text File
|
1992-09-14
|
8KB
|
201 lines
uvSurf v2.02 Doc file, (c) 1992 Nicolas Dade.
uvSurf is a program which lets you generate, look at and save (both
images and 3-d objects) surfaces of two parameters.
It runs equally under both 2.0 and 1.3.
It can be started from a CLI or from workbench.
From workbench it takes the following tooltypes:
HIRES
If present, the screen opened is a hires, interlaced screen.
Without it a lores non-interlaced screen is used.
SCFONT=font.name height
Specifies the font to be used as the screen's font (which appears
in the title bar and in the string gadgets). The OS will insist
the the screen's font be mono-spaced.
GGFONT=font.name height
Specifies the font to be used with the gadgets, except for the
interior of string gadgets, which appear in the screen font.
IMFONT=font.name height
Specifies the font to be used when drawing on the image (the
coordinates and the labels on the axis).
For example, if you wanted uvSurf to use a hires screen and the
times.font of height 24 for its gadgets, your tooltypes would be
HIRES
GGFONT=times.font 24
From a CLI the same options are available.
-hires
makes uvSurf use a hires interlaced screen and
-scfont name.font height
-ggfont name.font height
-imfont name.font height
specify the screen, gadget and image fonts.
For example, if you wanted uvSurf to use a hires screen and the
times.font of height 24 for its gadgets, you'd do something like
uvSurf -hires -ggfont times.font 24
The order in which the -xx arguments appear is not important,
however the two words following a font specifying argument must be
the font name and height. Fonts who's names contain a space should
be renamed or aliased by using links :)
uvSurf ?
will just dump version and copyright information.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Once you get uvSurf going it will show you a screen which looks
somewhat like this:
X(u,v) [_________________________________]
Y(u,v) [_________________________________]
Z(u,v) [_________________________________]
u Min [________] u Step [________] u Max [________]
v Min [________] v Step [________] v Max [________]
[Compute & Display] [Exit uvSurf]
uvSurf wants three functions of u and v, and the start, step and end
numbers for u and v. Once these are entered clicking on [Compute &
Display] starts the computations of X,Y,Z, and other things, and
once the computations are finished, the rendering of the image.
Clicking on [Exit uvSurf] does just what you think it does.
See the included file NiceEquations for some ideas. The functions
known are: +, -, *, /, ^ (power), abs, sign (-1, 0 or 1), sqr, max
(of two numbers), min (same), sin, cos, tan, asin, acos, atan, exp,
ln, hsin, hcos, and htan. uvSurf knows the constants e and pi, and
the variables u and v.
The u and v Min, Step and Max string are really equations just like
X(u,v), Y(u,v) and Z(u,v), so you may enter "pi/2" instead of
"1.5707...". However using the variables u and v in these equations
will lead you to trouble.
If uvSurf can't understand one of your entries it will return to you
and place the cursor on the first letter of the undecipherable word.
If uvSurf cannot allocate enough memory for its tables it will
return to you, placing the cursor in the u Step box, which is a hint
to you to increase u Step and/or v Step in order to reduce the
number of verticies.
While uvSurf is computing a bar is shown which fills to indicate
what percent of the floating-point computations are finished. _Any_
sort of floatingpoint chip and/or accelerator board helps greatly at
this stage. The computations can be interrupted by a break (ctrlc-c)
signal, which will return you to the "enter equations" stage. At
this stage second ctrl-c will exit uvSurf.
Once uvSurf is ready to display the surface, it changes the screen
colors and renders the surface. The following commands are then
available:
ESC go back to "enter equations" stage.
a toggle axis drawn / not drawn
p toggle perspective / orthogonal projections. The perspective
projection draws the object as if its maximum depth where
1/4 the distance between your eye and the monitor.
n toggles normals used to eliminate backside of surface /
all quadrangles drawn
r reverses the normals so that the other side becomes the
backside.
s draws the surface stepping through it from front to back,
waiting for a keystroke or a mouse click between each depth.
Pressing the s key again while in this mode turns the
stepping off and finishes the picture at full speed.
P (capital P) lets you save the current image as an iff
ilbm picture file.
O (capital O) lets you save the surface as an iff tddd 3-d
object file. These can be loaded into another program
(object editors and renders like Turbo Silver & Imagine,
for example). Because of the limit of 64K edges/object
inherent to the tddd file format surfaces which would
contain more than that many edges cannot be saved as tddd
files. (The number of edges is approximately 3 times the
number vertices, which is itself
floor((U Max-U Min)/U Step + 1)*floor((V Max-V Min)/V Step + 1)
1 through 7 above the alphabetic section of the keyboard select the
rendering mode. They are
1 Wireframe
2 Colored solid
3 black solid with colored edges
4 Colored solid with colored edges (my favorite)
5 Colored solid with black edges
6 Dots
7 Nebula (sort of a solid dots mode)
Since the Nebula mode requires 1 byte/pixel of memory in addition
to the usual requirements of all the modes, you may not have
enough memory available to use it (this can happen easily on 1/2
and 1 meg machines while in hires), in which case uvSurf will
switch back to Dots mode automatically.
And the "arrow keys" on the numeric key pad are used to rotate
the surface.
4 and 6 rotate it left and rightwards.
8 and 2 rotate it up and downwards.
7 and 9 rotate it counterclockwise and clockwisewards.
0 resets the rotation to the initial position (Z towards you, X towards
the right and Y towards the top)
And clicking on or near a vertex will show you the (u,v) and
(x,y,z) coordinates of that vertex. Note that in dots mode the dot
is at the center of the quadrangle, and thus is not a vertex.
Therefore the click thing and the dot mode don't work best together.
Since the orientation of the surface and all the other image parameters
are preserved when you return to the "enter equations" page, you can
generate the surface sparcely (with large u Step and v Step), get it
the way you want it, and then go back, lower the v and v Steps, and
see the same picture but with more quadrangles.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uvSurf uses the mathieeedoubbas.library and the
mathieeedoubtrans.library for its floating-point math, the
diskfont.library for finding fonts, the icon.library to look at its
tooltypes when started from workbench, and either the arp.library
or the asl.library for its filerequester. It will not run without
both math libraries being available.
Memory requirements:
4 bitplanes chip ram for the screen.
36 bytes/vertex during computations.
28 bytes/vertex during displaying.
1 extra bitplane in chip ram the size of the image area for any of
the solid modes (nebula is not a solid mode---at least not in this sense)
1 extra byte/pixel in the image area for nebula mode.
and assorted little odds and ends of memory all over the place.
This program is based on a BASIC program by Herman Rusius which showed
the roman surface and his ideas, encouragement and hospitality.
Thanks also to Marcus Damberger for his suggestions and Ed Serbe for
his help in testing the `save TDDD IFF 3-d object file' feature.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=